namespace Creek.UI.EFML.Base.Controls.Navigator
{
    using System;
    using System.Windows.Forms;

    public class HeadlessTabControl : TabControl
    {
        #region Constants

        private const int TCM_ADJUSTRECT = 0x1328;

        #endregion

        #region Methods

        protected override void WndProc(ref Message m)
        {
            // Hide the tab headers at run-time
            if (m.Msg == TCM_ADJUSTRECT && !this.DesignMode)
            {
                m.Result = (IntPtr)1;
                return;
            }

            // call the base class implementation
            base.WndProc(ref m);
        }

        #endregion
    }
}